package Java.com;

public class Test10 {
	public static void main(String[] args) {
		double[] myList = { 10.01, 12.19, 23.44, 43.95, 77.88, 65.00 };

		// 打印所有元素
		for (int i = 0; i < myList.length; i++) {
			System.out.print(myList[i] + ",");
		}
		System.out.println(" ");

		// 求和
		double total = 0;
		for (int i = 0; i < myList.length; i++) {
			total += myList[i];
		}
		System.out.println("总和：" + total);

		// 查找最大值
		double max = myList[0];
		for (int i = 1; i < myList.length; i++) {
			if (myList[i] > max) {
				max = myList[i];
			}
		}
		System.out.println("元素最大值：" + max);
	}
}
